{% extends 'homepage.html' %}

{% block content %}
<script type="text/javascript" src="{{ url_for('static', filename='elliptic_modular_form_util-functions.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='elliptic_modular_form_scripts.js') }}"></script>

  <!--a href="/ModularForm/">Modular Forms</a><a href="/ModularForm/GL2/"> on GL(2)</a><a href="/ModularForm/GL2/Q"> over \( \mathbb{Q} \)</a> : Holomorphic Cuspforms
-->

{% if info.error is defined %}
   {{ info.error | safe }}
{% else %}
<h1> {{ info.name | safe }}
<h2> {{ KNOWL('mf.elliptic.q-expansion',title='q-expansion')}}</h2>
	<br>
	{{ info.q_exp | safe }}
	<br>
	{{ info.polynomial_st | safe }}
	<!-- br>
	One can embed it into \(\mathbb{C}\) as
	<br -->
	<br>
	{{ info.embeddings | safe }}
        
        <h2> Detailed data</h2>
	The first few {{KNOWL('mf.elliptic.satake_parameters',title='Satake parameters')}} \(\alpha_p\) and angles \(\theta_p = \textrm{Arg}(\alpha_p) \) are
	<br>
	{{ info.satake | safe }}

        {% if info.CM_values is defined %}
        <h2>Special Values</h2>
	Values at some  {{ KNOWL('mf.elliptic.cm-points',title='CM points')}}
        
        <p>
        <table class="ntdata" style="width:50%">
          <thead>
            <tr>
              <th width="20px" style="border-right:1px solid black">Point&nbsp;\&nbsp;Embedding</th>
              {% for h in info.CM_values.embeddings  %}
              <th width="{{ info.CM_values.max_width }}">{{ h |safe }}</th>
              {% endfor %}
            </tr>
          </thead>
          <tbody>
            {% for tau in info.CM_values.tau %}
            <tr>
              <th width="10px" style="border-right: 1px solid black">
                {{ info.CM_values.tau_latex[tau] |  safe }}
              </th>
              {% for h in info.CM_values.cm_vals[tau]  %}
              {% set vals =info.CM_values.cm_vals_latex[tau] %}
              <td width="50px">{{ vals[h] }}</td>
              {% endfor %}
            {% endfor %}            
            </tr>
          </tbody>
        </table>
        </p>
        {% endif %}

	{% if info.explicit_formulas is defined %}
        <h2> {{KNOWL('mf.elliptic.explicitformulas',title='')}}Explicit Formulas</h2>
	
        {{info.explicit_formulas }}
	{% endif %}

	<!-- h2>Explicit Formulas</h2 -->
	{% if  true%}

        <h2>Further Properties</h2>
        <div>
          {% if info.is_cm is defined %}
          This newform is 
          {% if not info.is_cm[0] %}
          not
          {% endif %}
          a {{KNOWL('mf.elliptic.cm_form',title='CM form')}}.
          {% endif %}
          It is 
          {% if not info.is_minimal %}
          not
          {% endif %}
          {{KNOWL('mf.elliptic.minimal',title='minimal')}}.
        </div>
        {% if info.atkinlehner is defined and info.atkinlehner %}
        <div>
          The function has {{KNOWL('mf.elliptic.atkinlehner',title='Atkin-Lehner')}} eigenvalues given by 
          <p>
            {{ info.atkinlehner | safe }}.
          </p>
        </div>
        {% endif %}

        <h2>Get more coefficients</h2>
	<form name="get_coefficients" method="post"  action="{{url_for('.render_elliptic_modular_forms')}}">
	  <input type="hidden" name="download" value="coefficients">
	  Get / compute  <input type="text" size="10" name="number" value="10"> 
	  coefficients in the following format:
	  <input type="hidden" name="level" value="{{info.level }}">
	  <input type="hidden" name="character" value="{{info.character }}">
	  <input type="hidden" name="weight" value="{{info.weight }}">
	  <input type="hidden" name="label" value="{{info.label }}">
	  <ul>
	    <li> 
	      <label><input type=radio name="format" checked value="q_expansion_one_line" onclick="return selectCFormat(event)"> q-expansion (on one line)</label>
	    </li>
	    <li> 
	      <label><input type=radio name="format" checked value="q_expansion_table" onclick="return selectCFormat(event)"> q-expansion (table)</label>
	    </li>
	    <li>
	      <label><input type=radio name="format" value="embeddings" onclick="return selectCFormat(event)"> Complex embeddings </label>
	    with <input type="text" size="10" name="prec" value="15"> digits precision. 
	    </li>
	  </ul>
	  <input type="button" name="Submit" value="Get coefficients" onclick="check_coefficient_form()">
	  </form>

<h2>Download as {{KNOWL('sage',title='Sage')}} Object</h2>
<form name="download_object_form" method="post"  action="{{url_for('.render_elliptic_modular_forms')}}">
  <input type="hidden" name="download" value="object">
  <input type="hidden" name="level" value="{{info.level }}">
  <input type="hidden" name="character" value="{{info.character }}">
  <input type="hidden" name="weight" value="{{info.weight }}">
  <input type="hidden" name="label" value="{{info.label }}">
  <input type="submit" name="Submit" value="Download" Onclick="document.download.submit()">
</form>
<div class="formexample"> 
<form name="download_file" method="post"  action="{{url_for('.render_elliptic_modular_forms')}}">
  Note: In order to use this data file you need to download and import
  <input type="hidden" name="download" value="file">
  <input type="hidden" name="download_file" value="web_modforms.py">
  <a href="javascript:void(0);" OnClick="document.download_file.submit()">web_modforms.py</a>
 </form>
</div>
{% endif %}
{% endif %}
</div>

{% endblock %}
